import { ref } from "vue";
export const tableConfig = [
    { prop: "orderCode", label: "工单编号", minWidth: "180" },
    { prop: "areaName", label: "设备区域", minWidth: "100" },
    { prop: "equipmentNo", label: "设备编号", minWidth: "180" },
    { prop: "equipmentName", label: "设备对象", minWidth: "180" },
    { prop: "majorName", label: "专业", minWidth: "100" },
    { prop: "gradeName", label: "工单等级", minWidth: "80" },
    { prop: "soursceName", label: "报修来源", minWidth: "90" },
    { prop: "repairPersonName", label: "ID", minWidth: "70" },
    { prop: "responsibleDepartmentName", label: "负责部门", minWidth: "100" },
    { slotName: "status", label: "工单状态", minWidth: "80" },
    { prop: "startDate", label: "工单生成日期", minWidth: "180" },
    { prop: "endDate", label: "工单完结日期", minWidth: "180" },
    { label: "操作", minWidth: "80", slotName: "operate", fixed: "right" }
];
export const delayTableOneConfig = [
    { prop: "strSource", label: "工单来源", minWidth: "140" },
    { slotName: "createTime", label: "时间开始节点", minWidth: "140" },
    { slotName: "closeTime", label: "时间结束节点", minWidth: "140" },
    { prop: "cycle", label: "周期（天）", minWidth: "140" },
    { label: "操作", minWidth: "140", slotName: "operate", fixed: "right" }
];
export const delayTableTwoConfig = [
    { prop: "strWorkOrderLevel", label: "工单等级", minWidth: "140" },
    { slotName: "createTime", label: "时间开始节点", minWidth: "140" },
    { slotName: "closeTime", label: "时间结束节点", minWidth: "140" },
    { prop: "cycle", label: "周期（天）", minWidth: "140" },
    { label: "操作", minWidth: "140", slotName: "operate", fixed: "right" }
];
export const formConfig = ref([
    {
        formType: "select",
        formName: "areaLocation",
        labelName: "区域设置",
        placeholder: "请选择区域位置",
        style: {
            width: "194px"
        },
        options: []
    },
    {
        formType: "select",
        formName: "equipmentObject",
        labelName: "设备对象",
        placeholder: "请选择设备对象",
        style: {
            width: "194px"
        },
        options: []
    },
    {
        formType: "select",
        formName: "type",
        labelName: "工单等级",
        placeholder: "请选择对应专业",
        style: {
            width: "194px"
        },
        options: []
    },
    {
        formType: "select",
        formName: "soursce",
        labelName: "报修来源",
        placeholder: "请选择报修来源",
        style: {
            width: "194px"
        },
        options: []
    },
    {
        formType: "select",
        formName: "responsibleDepartment",
        labelName: "负责部门",
        placeholder: "请选择负责部门",
        style: {
            width: "194px"
        },
        options: []
    },
    {
        formType: "select",
        formName: "state",
        labelName: "工单状态",
        placeholder: "请选择工单状态",
        style: {
            width: "194px"
        },
        options: []
    },
    {
        formType: "select",
        formName: "major",
        labelName: "对应专业",
        placeholder: "请选择对应专业",
        style: {
            width: "194px"
        },
        options: []
    }
]);
export const delayFormAddConfig = [
    {
        formType: "select",
        formName: "workOrderLevel",
        labelName: "工单等级",
        placeholder: "请选择工单等级",
        options: [],
        style: {
            width: "100%"
        }
    },
    {
        formType: "input",
        type: "number",
        formName: "cycle",
        labelName: "周期（天）",
        placeholder: "请输入周期（天）",
        options: [],
        style: {
            width: "100%"
        }
    }
];
export const delayOneFormSetConfig = [
    {
        formType: "input",
        type: "number",
        formName: "cycle",
        labelName: "周期（天）",
        placeholder: "请输入周期（天）",
        style: {
            width: "100%"
        }
    }
];
export const popupFormSetConfig = [
    {
        formType: "select",
        formName: "areaId",
        labelName: "区域位置",
        placeholder: "请选择区域位置",
        style: {
            width: "212px"
        },
        options: []
    },
    {
        formType: "select",
        formName: "jobOrderNo",
        labelName: "设备对象",
        placeholder: "请选择设备对象",
        style: {
            width: "212px"
        },
        options: []
    },
    {
        formType: "select",
        formName: "jobOrderLevel",
        labelName: "工单等级",
        placeholder: "请选择对应专业",
        style: {
            width: "212px"
        },
        options: []
    }
];
export const popupFormGetConfig = [
    { formType: "text", formName: "projectId", labelName: "项目名称" },
    { formType: "text", formName: "name", labelName: "联系人姓名" },
    { formType: "text", formName: "phone", labelName: "联系人电话" },
    { formType: "text", formName: "position", labelName: "岗位名称" }
];
export const popupRules = {
    areaId: [
        {
            validator: (rule, value, callback) => {
                if (!value) {
                    callback(new Error("请选择区域位置"));
                } else {
                    return true;
                }
            },
            trigger: "change",
            required: true
        }
    ],
    jobOrderNo: [
        {
            validator: (rule, value, callback) => {
                if (!value) {
                    callback(new Error("请选择设备对象"));
                } else {
                    return true;
                }
            },
            trigger: "change",
            required: true
        }
    ],
    jobOrderLevel: [
        {
            validator: (rule, value, callback) => {
                if (!value) {
                    callback(new Error("请选择对应专业"));
                } else {
                    return true;
                }
            },
            trigger: "change",
            required: true
        }
    ]
};
